package com.mojo.concurrent.concurrent_08_collection;

import java.util.concurrent.ConcurrentLinkedQueue;

/**
 * @author <a href="mailto:mojo_jj@163.com">Mojo</a>
 */
public class ConcurrentLinkedQueueDemo01 {
    public static void main(String[] args) {
        ConcurrentLinkedQueue<Object> queue = new ConcurrentLinkedQueue();
        System.out.println("queue:"+queue);
        //投插
        queue.add(1);
        queue.add(2);
        //尾插
        queue.offer(3);
        System.out.println(queue.peek());
        System.out.println(queue.peek());
        //System.out.println("queue:"+queue);
    }
}
